package net.xdclass.component;

import net.xdclass.vo.PayInfoVO;

/**
 * @author : zhen.xue
 * @date : 2021-07-06 22:10
 */
public class PayStrategyContext {

    private PayStrategy payStrategy;

    public PayStrategyContext(PayStrategy payStrategy) {
        this.payStrategy = payStrategy;
    }


    /**
     * 根据支付策略调用该不同的支付
     * @param payInfoVO
     * @return
     */
    public String executeUnifiedOrder(PayInfoVO payInfoVO){
        return this.payStrategy.unifiedOrder(payInfoVO);
    };

    public String executeQueryPaySuccess(PayInfoVO payInfoVO){
        return this.payStrategy.queryPaySuccess(payInfoVO);
    }
}